<%@page import="java.sql.*"%>
<%@page import="model.DBAdapter"%>

<%
	DBAdapter adapter = DBAdapter.getInstance();
	adapter.open();	
	ResultSet rs = null;
	String query = "";
	
	String className = "";
	int classId = -1;
	String classHTML = "<option value=\""+classId+"\">--Select Qucik Link--</option>";
	String quickLink1HTML = classHTML;
	String quickLink2HTML = classHTML;
	String quickLink3HTML = classHTML;
	String quickLink4HTML = classHTML;
	String quickLink5HTML = classHTML;
	String quickLink6HTML = classHTML;
	
	int quickLinkNumber =-1;
	int quickLink1Id = -1;
	int quickLink2Id = -1;
	int quickLink3Id = -1;
	int quickLink4Id = -1;
	int quickLink5Id = -1;
	int quickLink6Id = -1;
	
	
	int selectedYear = 1977;
	try {
		selectedYear = ((Integer)session.getAttribute("selectedYear")).intValue();
	} catch (Exception e) {
		e.toString();
	}
	
	
	String quickLinkHTML = "";
	//quickLinkHTML = "<table><tr>";
	
	query = "select ql.quick_link_number, ql.class_id, ql.year, cl.class_name from quick_link ql, class cl where cl.class_id = ql.class_id ORDER BY ql.quick_link_number ASC"; 
	rs = adapter.select(query);
	while(rs.next()) {
		quickLinkHTML += "&nbsp;<a href='#' onclick=\"return quickStudentList('" +  rs.getInt("ql.class_id") + "', '" +  rs.getString("cl.class_name") + "', '" + selectedYear + "'); \">" + rs.getString("class_name") + "</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
	}
	
	
	//quickLinkHTML += "</tr><table>";
%>

<%=quickLinkHTML%>